<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>会员订单详情 - ${web.name}${web.additionalTitle!}</title>
    <link href="${root}/css/global.css" type="text/css" rel="stylesheet"/>
    <link href="${root}/css/layout.css" type="text/css" rel="stylesheet"/>
    <link href="${root}/css/member.css" type="text/css" rel="stylesheet"/>
    <link href="${root}/css/buy.css" type="text/css" rel="stylesheet"/>
    <link href="${root}/css/order.css" type="text/css" rel="stylesheet"/>

    <script src="${root}/js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        function addCart(orderId) {
            $("#orderId").val(orderId);
            $("#baseForm").attr("action", "${base}/cart/add_orderItem1.htm");
            $("#baseForm").submit();
        }
        function addToCollect(productId, productFashId) {
            $.post('${base}/collect/add_to_collect.htm', {
                'productId': productId,
                'productFashId': productFashId
            }, function (data) {
                if (data.status == 1) {
                    alert('收藏成功!');
                } else if (data.status == 2) {
                    alert('收藏过该商品');
                }
                else {
                    location.href = '${base}/login.htm';
                }

            }, 'json');
        }

        function addToCart(productId, count, fashId) {
            $.post('${base}/cart/add_orderItem.htm', {
                'productId': productId,
                'productAmount': count,
                'fashId': fashId
            }, function (data) {
                if (data.status == 1) {
                    location.href = '${base}/cart/shopping_cart.htm?backUrl=${location}';
                } else if (data.status == 0) {
                    location.href = '${loginUrl}';
                } else {
                    alert(data.error);
                }
            }, 'json');
        }
    </script>
</head>
<body>
[#include "../include/header_top.html"/]
<div id="head">
    [#include "../include/header_search.html"/]
    [#include "../include/header_nav.html"/]
</div>
<!--  
<div class="w960">
	 <div class="buy_position">您当前的位置：<a href="" target="_blank">首页</a>&nbsp;&gt;&nbsp;用户中心&nbsp;&gt;&nbsp;订单详情</div>
</div>
-->
<div class="w960 mt10">
    [#include "member_nav.html"/]
    <div id="container" class="user_right">
        <div class="usercenter_position"><span>订单详情</span></div>
        <div class="order_infod mt10">
            <div class="order_conhead">
                <ul>
                    <li>订单编号：<span style="color:#fe0000;">${order.code}</span></li>
                    <li>下单日期：<span style="color:#fe0000;">${order.createTime}</span></li>
                    <li>订单状态：<span style="color:#fe0000;"> [#if order.status=3][@s.m "order.status.${order.status}"/][#elseif order.status=4][@s.m "order.status.${order.status}"/]
                             [#elseif order.paymentStatus=1][@s.m "order.paymentStatus.${order.paymentStatus}"/]&nbsp;[#if order.shippingStatus=2][@s.m "order.shippingStatus.${order.shippingStatus}"/][/#if]
                             [#elseif order.paymentStatus=2][@s.m "order.paymentStatus.${order.paymentStatus}"/]&nbsp;[@s.m "order.shippingStatus.${order.shippingStatus}"/][/#if]
                            </span></li>
                    <li style="float:right;">
                        <form id="baseForm" action="../cart/add_orderItem1.htm" method="post">
                            <input type="hidden" id="orderId" name="orderId" value="${order.id}"/>
                            <button class="y90 mr5 orderListAgain" onclick="addCart(${order.id});">再放进购物车</button>
                        </form>
                    </li>
                </ul>
            </div>
            <div class="order_continf">
                <dl>
                    <dt>收货人信息</dt>
                    <dd>收货人：${order.receiveName!}</dd>
                    <dd>收货地址：${order.receiveAddress!}</dd>
                    <dd>手机号码：${order.receiveMobile!}</dd>
                    <dd>邮政编码：${order.receiveZip!}</dd>
                </dl>
                <dl>
                    <dt>配送信息</dt>
                    <dd>送货方式：${order.shipping.name!}</dd>
                    <dd>运费：&yen;${order.freight!}</dd>
                </dl>
                <dl>
                    <dt>支付信息</dt>
                    <dd>支付状态： [#if order.status=3][@s.m "order.status.${order.status}"/][#elseif order.status=4][@s.m
                        "order.status.${order.status}"/]
                        [#elseif order.paymentStatus=1][@s.m "order.paymentStatus.${order.paymentStatus}"/]&nbsp;[#if
                        order.shippingStatus=2][@s.m "order.shippingStatus.${order.shippingStatus}"/][/#if]
                        [#elseif order.paymentStatus=2][@s.m "order.paymentStatus.${order.paymentStatus}"/]&nbsp;[@s.m
                        "order.shippingStatus.${order.shippingStatus}"/][/#if]
                    </dd>
                    <dd>支付方式： ${order.payment.name}</dd>
                </dl>
                <dl>
                    <dt>积分信息</dt>
                    <dd>可获积分：￥${order.score!0}[#if order.status==20](可用积分)[#else](冻结中)[/#if]
                        <a class="hblue" href="${base}/xsrm/20.htm" target="_blank">查看积分规则</a>
                        <a class="hblue" href="${base}/shopScore/myscore.htm" target="_blank">查看我的积分</a>
                    </dd>
                </dl>
                <div class="order_info_list mt10">
                    <h3>商品信息</h3>
                    <table cellspacing="1" cellpadding="0" border="0" class="product_table">
                        <tbody>
                        <tr>
                            <th>
                            <th>商品名称</th>
                            <th>价格</th>
                            <th>数量</th>
                            <th>金额小计</th>
                            <th width="60px;">操作</th>
                        </tr>
                        [#list order.items as item]
                        <tr>
                            <td class="pro"><a class="pic" href="${item.product.url!}" target="_blank"><img
                                    src="${item.product.productExt.coverImg!}"/></a></td>
                            <td class="pro1" align="left">
                                <p><a href="${item.product.url!}" target="_blank">${item.product.name}</a></p>
                            </td>
                            <td align="center" width="50">[#if
                                item.productFash??]${item.productFash.salePrice!}[#else]${item.product.salePrice!}[/#if]
                            </td>
                            <td align="center" width="40">${item.count}</td>
                            <td align="center" width="70">[#if
                                item.productFash??]${item.productFash.salePrice*item.count!}[#else]${item.product.salePrice*item.count!}[/#if]
                            </td>
                            <td align="center">
		          				 <span>
		          				  [#if item.productFash??]
		          				    <a class="favoriteItem hblue" style="cursor:pointer;"
                                       onclick="javascript:addToCollect(${item.product.id},${item.productFash.id});">收藏</a>
		          				   [#else]
		          				    <a class="favoriteItem hblue" style="cursor:pointer;"
                                       onclick="javascript:addToCollect(${item.product.id},'');">收藏</a>
		          				   [/#if]
		          				   </span>
                                [#if item.productFash??]
                                <button class="productBuy y90 mr5 productBuyBtn"
                                        onclick="javascript:addToCart(${item.product.id},${item.count},${item.productFash.id});">
                                    再放进购物车
                                </button>
                                [#else]
                                <button class="productBuy y90 mr5 productBuyBtn"
                                        onclick="javascript:addToCart(${item.product.id},${item.count},'');">再放进购物车
                                </button>
                                [/#if]
                            </td>
                        </tr>
                        [/#list]
                        </tbody>
                    </table>
                    <div class="order_crash">
                        <ul>
                            <li><span>商品总金额：</span>&yen;${order.productPrice!}</li>
                            <li><span>运费：</span>+&yen;${order.freight!}</li>
                            <li class="order_crash_total"><span>发货前需先支付：</span><em>&yen;${order.total!}</em></li>

                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
[#include "../include/footer.html"/]
</body>
</html>
